#pragma once

#include <SharpShooter.h>
#include "Terrain.h"

using namespace std;
using namespace sharpShooter;
using namespace Core;
using namespace Scene;
using namespace Render;
using namespace Device;



enum TANK_DIRECTION
{
  TANK_DIR_FORWARD = 0,
  TANK_DIR_BACKWARD,
  TANK_DIR_LEFT,
  TANK_DIR_RIGHT
};

const float LENGTH_EACH_STEP = 2.5f;

class CTankBase
{
public:
  CTankBase(float pX,float pY,CMeshSceneNode *meshNode, TANK_DIRECTION direction,int velocity);
  void movement(TANK_DIRECTION direction);
  void update(void);
  int getPositionX()const;
  int getPositionY()const;
  void setVisible(bool visible);

  void setPosition();
  bool aabBox(TANK_DIRECTION direction);
  void loadMap(const char *mapFile);

protected:
  CTankBase(){};
private:
  TANK_DIRECTION	m_Direction;
  int				m_Velocity;
  float				m_PositionX;
  float				m_PositionY;
  CMeshSceneNode	*m_MeshNode;
  int m_TerrainMap[TERRAIN_HEIGHT][TERRAIN_WIDTH];

};